home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1000 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: cs.mu.OZ.AU!bounce-back
  2. From: davidb@datalytics.com (David Bradley)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: C++ syntactic trap
  5. Date: 08 Apr 96 14:35:56 GMT
  6. Organization: Datalytics Inc.
  7. Approved: fjh@cs.mu.oz.au
  8. Message-ID: <31691990.256606019@news>
  9. References: <4k3q4p$lkd@syn.cs.cornell.edu>
  10. NNTP-Posting-Host: mundook.cs.mu.oz.au
  11. X-Original-Date: Mon, 08 Apr 1996 13:57:04 GMT
  12. X-Newsreader: Forte Agent .99d/32.182
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBFAgUBMWkkVOEDnX0m9pzZAQFs9wF+KPQA+im+crpIa499BIIiR/cJ2t27G65O
  15.     pqhda5rOXObdoeDpCpeHRK2VY+OsmCHR
  16.     =VK/x
  17. Originator: fjh@mundook.cs.mu.OZ.AU
  18.  
  19. vavasis@CS.Cornell.EDU (Stephen Vavasis) wrote:
  20.  
  21. >I would like to make a plea to the compiler-writers who read this
  22. >group: please issue warnings for syntactic trouble spots!  Implicit
  23. >type conversion probably creates other traps that I haven't thought
  24. >of.  C++ programmers like me need help from the compiler to navigate
  25. >the traps!
  26.  
  27. What about when I create a normal object?
  28.  
  29. MyClass* pMyObject = new MyClass(Initializer);
  30.  
  31. Should this also generate a warning?  If the syntax was exceptional,
  32. but legal,  then I'd say'd it should generate a warning.  However,
  33. this syntax is not exception and is used quite frequently.
  34.  
  35. ===============================================
  36. DISCLAIMER: I may be a member of humanity,
  37. but I'm not a spokesman for humanity.
  38.     davidb@datalytics.com
  39. ---
  40. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  41. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  42. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  43. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  44. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  45.